<div id="form">
	<div id="info">
		<table>
			<tr>
				<td colspan="2"><h2>Mes informations personnelles</h2></td>
			</tr>
			<tr class="ligne">
				<td width="30%">Civilité<span class="asterix">*</span></td>
				<td width="70%"><select name="title">
					<option></option>
					<option value="Mr." <? if($_SESSION['user_title']=="MR.") echo "selected='yes'"; ?>>MR.</option>
					<option value="MME" <? if($_SESSION['user_title']=="MME") echo "selected='yes'"; ?>>MME</option>
					<option value="MLLE" <? if($_SESSION['user_title']=="MLLE") echo "selected='yes'"; ?>>MLLE</option>
				</select></td>
			</tr>
			<tr class="ligne">
				<td>Email<span class="asterix">*</span></td>
				<td><input class="text" name="email" type="text" value="<? echo $_SESSION['user_email'] ?>" /></td>
			</tr>
			<tr class="ligne">
				<td>Password<span class="asterix">*</span></td>
				<td><input class="text" name="password" type="password" maxlength="12" value="<? echo $_SESSION['user_password'] ?>" /></td>
			</tr>
			<tr class="ligne">
				<td>Date de naissance<span class="asterix">*</span></td>
				<?
				$date = split("-", $_SESSION['user_birthdate']);
				$year = $date[0];
				$month = $date[1];
				$day = $date[2];
				?>
				<td>
				<select name="birthday"><option></option><? for($i=1;$i<=31;$i++) { if($i<10) $i="0".$i; if($i==$day) echo "<option selected='selected'>$i</option>"; else echo "<option>$i</option>";} ?></select> 
				<select name="birthmonth"><option></option><? for($i=1;$i<=12;$i++) { if($i<10) $i="0".$i; if($i==$month) echo "<option selected='selected'>$i</option>"; else echo "<option>$i</option>";} ?></select> 
				<select name="birthyear"><option></option><? for($i=2009;$i>=1900;$i--) { if($i<10) $i="0".$i; if($i==$year) echo "<option selected='selected'>$i</option>"; else echo "<option>$i</option>";} ?></select></td>
			</tr>
		</table>
	</div>
	<div id="address">
		<table>
			<tr>
				<td colspan="2"><h2>Mes coordonnées</h2></td>
			</tr>
			<tr class="ligne">
				<td>Prénom<span class="asterix">*</span></td>
				<td><input class="text" name="adr_firstname" type="text" value="<? echo $_SESSION['adr_firstname'] ?>" /></td>
			</tr>
			<tr class="ligne">
				<td>Nom<span class="asterix">*</span></td>
				<td><input class="text" name="adr_lastname" type="text" value="<? echo $_SESSION['adr_lastname'] ?>" /></td>
			</tr>
			<!--<tr class="ligne">
				<td width="30%">Nom de l'entreprise</td>
				<td width="70%"><input class="text" name="adr_company" type="text" value="<? echo $_SESSION['adr_company'] ?>" /></td>
			</tr>-->
			<tr class="ligne">
				<td>Adresse<span class="asterix">*</span><input type="hidden" name="adr_company" value="" /></td>
				<td><textarea name="adr_address" rows="2" cols="2"><? echo $_SESSION['adr_address'] ?></textarea></td>
			</tr>
			<tr class="ligne">
				<td>Ville<span class="asterix">*</span></td>
				<td><input class="text" name="adr_city" type="text" value="<? echo $_SESSION['adr_city'] ?>" /></td>
			</tr>
			<tr class="ligne">
				<td>Code postal<span class="asterix">*</span></td>
				<td><input class="text" type="text" name="adr_zipcode" value="<? echo $_SESSION['adr_zipcode'] ?>" maxlength="5" /></td>
			</tr>
			<tr class="ligne">
				<td>Téléphone<span class="asterix">*</span></td>
				<td><input class="text" name="adr_phone" type="text" value="<? echo $_SESSION['adr_phone'] ?>" maxlength="10" /></td>
			</tr>
			<tr class="ligne">
				<td>Portable</td>
				<td><input class="text" name="adr_cellphone" type="text" value="<? echo $_SESSION['adr_cellphone'] ?>" maxlength="10" /></td>
			</tr>
			<tr class="ligne">
				<td>Pays<span class="asterix">*</span></td>
				<td><select name="adr_country"><option value="France">France</option></select></td>
			</tr>
		</table>
	</div>
	<div class="info">
		<input id="check1" name="useliv" class="checkbox" type="checkbox" onclick="showHideLivAddress();" <? if($_SESSION['user_liv_address'] != $_SESSION['user_address']) echo "checked"; ?> /><label for="check1">Cochez cette case si vous désirez vous faire livrer à une autre adresse.</label>
	</div>
	<div id="livraison" class="double">
		<table class="left">
			<tr><td colspan="2">&nbsp;</td></tr>
			<tr>
				<td colspan="2"><h2>Mon adresse de livraison</h2></td>
			</tr>
			<tr class="ligne">
				<td>Civilité<span class="asterix">*</span></td>
				<td><select name="liv_title">
					<option></option>
					<option <? if($_SESSION['liv_title']=="MR.") echo "selected='yes'"; ?>>MR.</option>
					<option <? if($_SESSION['liv_title']=="MME") echo "selected='yes'"; ?>>MME</option>
					<option <? if($_SESSION['liv_title']=="MLLE") echo "selected='yes'"; ?>>MLLE</option>
				</select></td>
			</tr>
			<tr class="ligne">
				<td>Prénom<span class="asterix">*</span></td>
				<td><input class="text" name="liv_firstname" type="text" value="<? echo $_SESSION['liv_firstname'] ?>" /></td>
			</tr>
			<tr class="ligne">
				<td>Nom<span class="asterix">*</span></td>
				<td><input class="text" name="liv_lastname" type="text" value="<? echo $_SESSION['liv_lastname'] ?>" /></td>
			</tr>
			<!--<tr class="ligne">
				<td width="30%">Nom de l'entreprise</td>
				<td width="70%"><input class="text" name="liv_company" type="text" value="<? echo $_SESSION['liv_company'] ?>" /></td>
			</tr>-->
			<tr class="ligne">
				<td>Adresse<span class="asterix">*</span></td>
				<td><textarea rows="2" cols="2" name="liv_address"><? echo $_SESSION['liv_address'] ?></textarea></td>
			</tr>
		</table>
		<table class="right">
			<tr><td class="clear" colspan="2">&nbsp;</td></tr>
			<tr>
				<td colspan="2"><h2>&nbsp;</h2></td>
			</tr>
			<tr class="ligne">
				<td>Ville<span class="asterix">*</span></td>
				<td><input class="text" name="liv_city" type="text" value="<? echo $_SESSION['liv_city'] ?>" /></td>
			</tr>
			<tr class="ligne">
				<td>Code postal<span class="asterix">*</span></td>
				<td><input class="text" type="text" name="liv_zipcode" value="<? echo $_SESSION['liv_zipcode'] ?>" maxlength="5" /></td>
			</tr>
			<tr class="ligne">
				<td>Téléphone *</td>
				<td><input class="text" name="liv_phone" type="text" value="<? echo $_SESSION['liv_phone'] ?>" maxlength="10" /></td>
			</tr>
			<tr class="ligne">
				<td>Portable</td>
				<td><input class="text" name="liv_cellphone" type="text" value="<? echo $_SESSION['liv_cellphone'] ?>" maxlength="10" /></td>
			</tr>
			<tr class="ligne">
				<td>Pays<span class="asterix">*</span></td>
				<td><select name="liv_country"><option value="France">France</option></select></td>
			</tr>
		</table>
	</div>
	<?
	if($_SESSION['user_liv_address'] == $_SESSION['user_address']) {
	} else {
		echo "<script language='javascript' type='text/javascript'>document.getElementById('check1').onclick();</script>";
	}
	?>
</div>